####################################################
## Study military and education treatments ##
#need plotrix
####################################################
library("plotrix", lib.loc="F:/R/R-2.15.0/library")
x <- c(1.05, 1.2, 1.35, 1.5, 1.65, 1.8) #where the x axis points are
y <- c(.188, -.023, 1.157, .146, -.109, 1.249) #gen,~mil & mil treat, mil treat& mil, educ
se <- c(.262, .279, .399, .259, .282, .407)
#Fall miller + 
uiw <- 1.96*se
#porkc, military, military*pork interaction 
par(mar = c(1,4,1,2))
plotCI(x, y, uiw, ylim = c(-1.5, 2.3), xlim = c(1, 2.05), axes=F, family="serif",
  ylab=("Change in Support for Sen. Nelson (FL)"), family="serif",  main=(""), 
pch=c(2, 2, 17, 21, 21, 19, 0, 15, 0, 15)) 
	text(1.15, 2.25, "Sen. Nelson\nCollege Treatment", family="serif",) 
	text(1.6, 2.25, "Sen. Nelson\nHigher Education Treatment", family="serif",)

#now the lower labels
text(1.05, -.925, "General\nTreatment", cex=.8, family="serif",)
text(1.2, -.925, "Education\nTreatment,\nNot\n in College", cex=.8, family="serif",)
text(1.35, -.925, "Education\nTreatment,\nIn College", cex=.8, family="serif",)
text(1.5, -.925, "General\nTreatment", cex=.8, family="serif",)
text(1.65, -.925, "Educ. Treat,\nNot\nSupporting\n Higher Ed.", cex=.8, family="serif",)
text(1.8, -.925, "Education\nTreatment,\nSupporting\n Higher Ed.", cex=.8, family="serif",)

	abline(h=0) # the control line
	#abline(v=.5)
	axis(side=2) #where the y axis is
text( .96, -1.4, adj=0, family="serif","Note: estimates represent the marginal treatment effect on support for the indicated Member with 95% confidence intervals.
Solid symbols are statistically significant at the p<0.05 level, two-tailed. Sen. Nelson Treatment N=159 (College) and 160 (Higher Education).", 
cex=.7)
segments(1.4, -.85, 1.4, 2, lty=3) #this is the bisection line
#segments(1.65, -.8, 1.65, 2, lty=3) #this is the bisection line

#,  adj=c(-.2,1)